package com.insideClass.AnonymityInsideClass;

import com.insideClass.typeinfo.Dog;

class PerformingDog extends Dog implements Performs{

    @Override
    public void speak() {
        System.out.println("Woof");
    }

    @Override
    public void sit() {
        System.out.println("sitting");
    }
    public void reproduce(){

    }
}
/**
 * @author 13699
 */
class Robot implements Performs{

    @Override
    public void speak() {
        System.out.println("Click");
    }

    @Override
    public void sit() {
        System.out.println("Clank");
    }
}
class Communicate{
    public static <T extends Performs> void perform(T performer){
        performer.speak();
        performer.sit();
    }
}
/**
 * @author 13699
 */
public class DogAndRobots {
    public static void main(String[] args) {
        PerformingDog d=new PerformingDog();
        Robot r=new Robot();
        Communicate.perform(d);
        Communicate.perform(r);
    }
}
